﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Gui/masterPage.Master" AutoEventWireup="true" CodeBehind="Cart.aspx.cs" Inherits="OnlineStore.Gui.Cart" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentTitle" runat="server">
    <h1> Giỏ hàng của bạn</h1>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentCenter" runat="server">
    <div class="warning">
        Sản phẩm được đánh dấu với *** không có trong số lượng bạn muốn hoặc không còn trong kho!
    </div>
    </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentTop" runat="server">
    <h1>Sản phẩm </h1>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="mainCart" runat="server" AutoGenerateColumns="False"
        BorderStyle="None" CssClass="cart" AllowPaging="True" 
        onpageindexchanging="mainCart_PageIndexChanging" PageSize="3">
        <Columns>
            <asp:TemplateField HeaderText="xóa">
                <ItemTemplate>
                    <asp:CheckBox  ID="Del"   runat="server" />
                    <asp:Label ID="ID"  Text='<%# DataBinder.Eval(Container,"DataItem.ID") %>' runat="server" Visible="False" ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:ImageField DataImageUrlField="ID" 
                DataImageUrlFormatString="/Bll/ImageHttpHandler.ashx?id={0}" HeaderText="Hình">
                <ControlStyle Width="75px" />
            </asp:ImageField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="/Gui/ProductDetail.aspx?id={0}" 
                DataTextField="Product_Name" HeaderText="Tên" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label ID="Warning" runat="server" Text="***" Visible="false" ForeColor="Red"></asp:Label>
                </ItemTemplate>
                <FooterStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:BoundField DataField="Type" HeaderText="Loại" />
            <asp:TemplateField HeaderText="Số lượng">
                <ItemTemplate>
                    <asp:TextBox ID="Qty"  runat="server" si Width="20px" Text='<%# DataBinder.Eval(Container,"DataItem.NumberOrder")%>'></asp:TextBox>
                    
                </ItemTemplate>
                <FooterStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:BoundField DataField="Price" HeaderText="Đơn giá" 
                DataFormatString="{0:0,0 VNĐ}" />

            <asp:BoundField DataField="Sum" DataFormatString="{0:0,0 VNĐ}" 
                HeaderText="Tổng" SortExpression="Sum" />

        </Columns>
    </asp:GridView>
    <asp:Label ID="lb_Warning" runat="server" Visible="false" CssClass="warning"></asp:Label>
    <div style="width: 100%; display: inline-block;">
        <table style="float: right; display: inline-block;">
                    <tbody><tr>
            <td align="right"><b>Tiền hàng:</b></td>
            <td align="right">
                <asp:Label ID="lb_Money" runat="server" Text="0 VNĐ"></asp:Label></td>
          </tr>
          <tr>
            <td align="right"><b>Tổng cộng:</b></td>
            <td align="right">
                <asp:Label ID="lb_Sum_Money" runat="server" Text="0 VNĐ"></asp:Label></td>
          </tr>
        </tbody></table>
        <br>
      </div>
      <br />
      <div class="buttons">
        <table>
          <tbody><tr>
            <td align="left">
                <asp:Button ID="Button2" runat="server" Text="Cập nhật" Height="25px"
                    Width="70px" BackColor="#77B21B" ForeColor="White" />
            </td>
            <td align="center"><a onclick="location = '/'" class="button1"><span>Tiếp tục mua hàng</span></a></td>
            <td align="right">
                <asp:Button ID="Button3" runat="server" Text="Thanh toán" Height="25px" 
                    Width="70px" BackColor="#77B21B" ForeColor="White" onclick="OnSubmit"/>
            </td>
          </tr>
        </tbody></table>
      </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentButtom" runat="server">
    <h1>Chi tiết đơn hàng</h1>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Contentlist" runat="server">
    <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <p>
            Cung cấp thông tin về đơn hàng và nơi giao hàng
        </p>
        
    </div>
    <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <asp:Label ID="lb_Address" runat="server" Text="Địa chỉ giao hàng"></asp:Label>
        <br /><br />
        <asp:TextBox ID="tb_Address" runat="server" Rows="3" TextMode="MultiLine" 
            Width="371px"></asp:TextBox>
    </div>
</asp:Content>
<asp:Content ID="content7" ContentPlaceHolderID="ContentLogin" runat="server">
    <asp:HyperLink ID="HL_tab_login" runat="server" NavigateUrl="/gui/Login.aspx" ForeColor="Red">(Đăng nhập) </asp:HyperLink> |
    <asp:HyperLink ID="HL_tab_Logout" runat="server"  Visible="false" NavigateUrl="/gui/Login.aspx?logout=true">Đăng Xuất | </asp:HyperLink>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="ContentCartRight" runat="server">
        <asp:GridView ID="ListCartRight" runat="server" AutoGenerateColumns="False" 
           GridLines="None">
            <Columns>
                <asp:BoundField DataField="NumberOrder" SortExpression="NumberOrder" 
                    DataFormatString="{0} x " >
                
                <ControlStyle Width="10px" />
                </asp:BoundField>
                
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataTextField="Product_Name" 
                    DataNavigateUrlFormatString="/gui/ProductDetail.aspx?id={0}" />
            </Columns>
        </asp:GridView>
    <br>
    <table cellpadding="0" cellspacing="0" align="right" style="display:inline-block;">
     <tbody>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tiền hàng:</b></span></td>
            <td align="right">
                <asp:Label ID="lb_Sum_product" runat="server" CssClass="cart_module_total" >0 VNĐ</asp:Label>
             </td>
        </tr>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tổng cộng:</b></span></td>
            <td align="right"><span class="cart_module_total">
                <asp:Label ID="lb_Sum" runat="server" CssClass="cart_module_total">0 VNĐ</asp:Label></span></td>
        </tr>
     </tbody></table>
</asp:Content>